package onlinecalsys.server.init;

import java.rmi.Naming;
import java.rmi.RMISecurityManager;

import onlinecalsys.server.controller.CalsysServerController;
import onlinecalsys.server.controller.ServerController;

public class ServerStart {
	
	public static void main(String[] args) {
		try{
			if (System.getSecurityManager() == null) {

		        System.setSecurityManager(new RMISecurityManager());
		}


			ServerController con = new CalsysServerController();
			
			Naming.rebind("rmi://127.0.0.1/calsyscontroller", con);
			
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	

}
